package cloud.seri.auth.service.mapper

import cloud.seri.auth.domain.Role
import cloud.seri.auth.service.dto.RoleDTO

import org.mapstruct.Mapper
import org.mapstruct.Mapping
import org.mapstruct.Mappings

/**
 * Mapper for the entity [Role] and its DTO [RoleDTO].
 */
@Mapper(componentModel = "spring", uses = [])
interface RoleMapper : EntityMapper<RoleDTO, Role> {


    fun fromId(id: String?): Role? {
        if (id == null) {
            return null
        }
        val role = Role()
        role.id = id
        return role
    }
}
